package com.xuecheng.controller;


import com.xuecheng.service.VideoScraperService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@Api("视频获取")
@RestController
public class VideoScraperController {

    @Autowired
    private VideoScraperService videoScraperService;

    @ApiOperation("获取视频信息")
    @PostMapping("/video/get")
    public String getVideoInfo() throws IOException, InterruptedException {

        String b = videoScraperService.getVideo("https://www.yinghuadm.cn/play_9098-1-2.html");

        return "success";
    }
}
